[][src]Crate market

Infrastructure for producers and consumers in a market.

A market is a stock of goods that can have agents act upon it. An agent can be either a Producer that stores goods into the market or a Consumer that retrieves goods from the market. The important thing to note about agents is that they are immutable during their respective actions.

Modules

channel

Implements Producer and Consumer for various types of channels.

io

Implements Producer and Consumer for Write and Read trait objects.

process

Implements Producer and Consumer for the standard I/O streams of a process.

queue

Implements Producers and Consumers for queues.

sync

Implements Producer and Consumer for synchronization items.

thread

Implements Consumer for a thread.

vec

Implements Producer and Consumer for a Vec of actors.

Structs

InsufficientStockFailure

The Failure thrown when a faultless agent fails to complete an action.

Enums

ConsumeFailure

The typical Failure thrown when a Consumer is unable to consume a good.

ProduceFailure

The typical Failure thrown when a Producer is unable to produce a good.

Traits

Consumer

Retrieves goods from a market.

Failure

Specifies a failure to successfully complete an action.

Producer

Specifies the storage of goods into a market.

Derive Macros

ConsumeFault

Makes type able to be T in ConsumeFailure.

ProduceFault

Makes type able to be T in ProduceFailure.